package st.yushao.restaurant.action.custom;

import java.util.List;

import st.yushao.restaurant.dao.FoodTypeDaoService;
import st.yushao.restaurant.fw.AbstractBaseAction;
import st.yushao.restaurant.vo.FoodTypeVO;

public class GetFoodTypeList extends AbstractBaseAction {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = -7483907163873502899L;

    /**
     * hibernate service of foodtype
     */
    private FoodTypeDaoService ftds;

    /**
     * getter of ftds
     */
    public FoodTypeDaoService getFtds() {
        return ftds;
    }

    /**
     * setter of ftds
     */
    public void setFtds(FoodTypeDaoService ftds) {
        this.ftds = ftds;
    }

    /**
     * List of foodTypes
     */
    private List<FoodTypeVO> foodTypes;

    /**
     * getter of foodTypeList
     */
    public List<FoodTypeVO> getFoodTypes() {
        return foodTypes;
    }

    /**
     * setter of foodTypeList
     *
     * @return
     */
    public void setFoodTypes(List<FoodTypeVO> foodTypes) {
        this.foodTypes = foodTypes;
    }

    public String doExecute() {
        int restId = getRestId();
        foodTypes = ftds.getFoodTypeListByRest(restId);
        return SUCCESS;
    }

}
